/**
 * Copyright (C) 2012 The SkyTvOS Project
 * <p/>
 * Version     Date           Author
 * ─────────────────────────────────────
 * 2014年12月29日         luwei
 */

package com.coocaa.launcher.sidebar.left.item.appcircle;

import android.content.Context;
import android.view.Gravity;
import android.view.View;
import android.widget.TextView;

import com.coocaa.launcher.sidebar.left.SideItemView;
import com.coocaa.x.uipackage.SkinManager;
import com.tianci.appstore.R;
import com.tianci.appstore.utils.SkyConstants;

public class AppCircleItem extends SideItemView {
    public AppCircleItem(Context context) {
        super(context);
    }

    @Override
    public String getItemName() {
        // TODO Auto-generated method stub
        return SkinManager.getInstance().getString(R.string.left_side_app_circle);
    }

    @Override
    public int getItemIconId() {
        // TODO Auto-generated method stub
        return R.drawable.launcher_app_circle;
    }

    @Override
    public View getRightView() {
        TextView view = new TextView(mContext);
        SkinManager.getInstance().setBackgroundResource(view, R.drawable.left_side_redpoint);
        view.setTextAppearance(mContext, R.style.left_side_bar_memory_tip_style);
        view.setTextSize(SkyConstants.Dpi(39));
        view.setGravity(Gravity.CENTER | Gravity.TOP);
        view.setHeight(SkyConstants.Div(50));
        view.setWidth(SkyConstants.Div(50));
        mRightView = view;
        mRightView.setVisibility(View.GONE);
        return mRightView;
    }

    @Override
    public void onClick(View v) {
        super.onClick(v);
    }

    public void setAppNewsNum(final String num) {
        runOnUiThread(new Runnable() {
            @Override
            public void run() {
                ((TextView) mRightView).setText(num);
            }
        });
    }

    @Override
    public void destory() {
        // TODO Auto-generated method stub

    }
}
